package com.example.fzj.hazelcast;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.concurrent.atomic.LongAdder;

/**
 * @Author fanzj
 * @Date 2021/8/16 10:19 上午
 * @Version 3.0
 * @Description
 */
@Controller
public class IndexController {

    static final LongAdder  longAdder=new LongAdder();
    @RequestMapping("/")
    public String index() {

        longAdder.add(1L);
        if (longAdder.intValue() % 2 == 0) {
            return "redirect:/login.html";
        }
        return "redirect:/index.html";
    }
}
